﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TalkServer.common
{
    public partial class frmServerIP : Form
    {
        public frmServerIP()
        {
            InitializeComponent();
        }

        public frmServerIP(string serverIP)
        {
            InitializeComponent();

            textBox1.Text = serverIP;
        }

        private void frmServerIP_Load(object sender, EventArgs e)
        {

        }

        public string ServerIP { get;private set; }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Hide();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            ServerIP = textBox1.Text;
        }

    }
}
